package cn.zktr.Personnel.controllers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.zktr.Personnel.model.service.zhouyongcong.end.hopaService;

@Controller
public class hopaController {
	
	@Autowired
	private hopaService hs;
	
	@RequestMapping("zyc/OAsql")
	public void OAsql(HttpSession session) {}
	@RequestMapping("zyc/OA")
	public void OA(HttpSession session) {}
	
	@RequestMapping("login_dl")
	@ResponseBody
	public int login(HttpSession session,String pwd,String acc) {
		return hs.login(session, pwd, acc);
	}
	@RequestMapping("login_zx")
	@ResponseBody
	public void login_zx(HttpSession session) {
		session.removeAttribute("id");
	}
	
	@RequestMapping("home-pape")
	public String home_pape(HttpSession session,HttpServletRequest request) {
		Object obj = session.getAttribute("id");
		return hs.home_pape(session, request, obj);
	}
}
